package com.zwj.controller;


import com.zwj.bo.CourseBo;
import com.zwj.bo.StudentCourseBo;
import com.zwj.dto.Result;
import com.zwj.entity.CourseEntity;
import com.zwj.service.CourseService;
import com.zwj.service.StudentCourseService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zwj
 * @since 2021-10-30
 */
@RestController
@RequestMapping("/studentCourse")
public class StudentCourseController {
    private final StudentCourseService studentCourseService;

    public StudentCourseController(StudentCourseService studentCourseService) {
        this.studentCourseService = studentCourseService;
    }
    //添加学生课程关联
    @PostMapping("/addStudentCourse")
    public Result addStudentCourse(@RequestBody StudentCourseBo studentCourseBo) {
        return studentCourseService.addStudentCourse(studentCourseBo);
    }
    //查询学生拥有的课程
    @PostMapping("/seleteStudentCourse")
    public Result seleteStudentCourse(@RequestBody StudentCourseBo studentCourseBo) {
        return studentCourseService.seleteStudentCourse(studentCourseBo);
    }
}

